package com.liang.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import org.apache.ibatis.annotations.Delete;

import java.lang.reflect.Type;
import java.util.Date;

/**
 * @program: mybatis_plus
 * @description: 用户对象
 * @author: Mr.Liang
 * @create: 2021-07-30 15:26
 **/
@Data
public class User {

    //对应数据库中的主键(uuid、自增id、雪花算法、redis、zookeeper！)
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private Integer age;
    private String email;
    @Version//乐观锁注解
    private Integer version;
    @TableLogic//逻辑删除
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
}
